# CTE Program Analysis: REGS directors

This repository contains Stata programs (`.do` files) used to analyze the returns to Career and Technical Education (CTE) credentials. The scripts implement a Frisch-Waugh-Lovell (FWL) approach to estimate the impact of degree completion on earnings by residualizing individual-specific trends.

## Core Analysis Scripts

* **`00.01.sumstats_cte.do`**
    * **Purpose:** Generates **Panel B of Table 1**: Summary Statistics for CTE enrollees.
    * **Details:** Calculates means and counts for demographic variables (gender, race) and earnings outcomes (national vs. in-state, level vs. log). It also tracks "missingness" by identifying individuals with zero in-state or national earnings before and after enrollment.
* **`02_fwl_trend_regs.do`**
    * **Purpose:** Performs the first step of the Frisch-Waugh-Lovell (FWL) de-trending process.
    * **Details:** Iterates through individual records to regress earnings, enrollment status, graduation indicators, and demographic dummies on a time trend (`qtime`). It stores the resulting residuals, which represent the portion of these variables not explained by a linear time trend.
* **`03_regs_resid.do`**
    * **Purpose:** Generates estimates for **Table 3: Returns to CTE Credentials**.
    * **Details:** Using the residuals produced in the previous step, this script runs regressions (using `areg` with person-level fixed effects and clustered standard errors) to estimate the impact of graduating on log and level earnings. It breaks down the results by degree level (e.g., Certificates vs. Associates).

## Methodology Note: FWL De-trending
The analysis uses a two-step procedure to account for person-specific earnings trajectories:
1.  **Step 1 (`02_fwl_trend_regs.do`):** Residualize all dependent and independent variables against a time trend for each individual.
2.  **Step 2 (`03_regs_resid.do`):** Regress the residualized outcome on the residualized treatment variable to obtain the de-trended estimate of interest.

## Requirements

- **Software:** Stata 16 or newer.
- **Dependencies:** Requires a `config.do` file to define path macros such as `$datadir`, `$supportdir`, and `$logdir`.
- **Primary Datasets:** - `allearnings_cte_regressions.dta` (Raw input for summary stats)
    - `cte_regressions.dta` (Input for de-trending)
    - `cte_resid_earn_[state/national].dta` (Intermediate residual files)